<template>
	<div name="detailMember">
		<van-nav-bar
			title="学生详情"
			left-arrow
			left-text="返回"			
			fixed
			@click-left="$router.go(-1)"
		/>
		<van-cell-group title="-">
            <van-cell title="姓名" :value="detailMember.name" />
            <van-cell title="学号" :value="detailMember.no" />
            <van-cell title="性别" :value="detailMember.sex" />
            <van-cell title="学校" :value="detailMember.school" />
            <van-cell title="学院" :value="detailMember.college" />
        </van-cell-group>

        <van-cell-group title="-">
            <van-cell title="签到经验值" :value="detailMember.experience + '/' +detailMember.allExperience" is-link @click="goDetailExperience"/>            
        </van-cell-group>
		
        <van-cell-group title="-">
            <van-cell title="出勤等级" :value="signInLevel" />            
        </van-cell-group>
	</div>
</template>

<script>
	// import { Dialog } from 'vant';
	// import bkDetails from '@/components/detailBk/bkDetails.vue';
	// import bkMember from '@/components/detailBk/bkMember.vue';
	// // import bkNotice from '@/components/detailBk/bkNotice.vue';
	// // import bkSource from '@/components/detailBk/bkSource.vue';
	// import {quitCourse} from '@/api/member.js';
	// import { dict } from '@/api/dict.js';
	export default {
		name: 'detailMember',
		components: {		
			
		},
		created() {
			// this.detailBankeInfo = JSON.parse(localStorage.getItem('detailBankeInfo'));
            this.detailMember = JSON.parse(localStorage.getItem('detailMember'));
			
			
		},
		data(){
			return {
				
			}
		},
		computed: {
			signInLevel() {
                const rate = this.detailMember.experience/this.detailMember.allExperience;
                if(rate>0.9) return '优秀'
                else if(rate>0.7) return '良好'
                else if(rate>0.6) return '及格'
                else return '不及格'
            }
			
		},
		methods: {
            
			goDetailExperience() {
                
                this.$router.push(
                    {
                        name : 'detailExperience' ,
                        // params: {
                        //     studentId: this.$route.params.detailMember.id
                        // }
                    }
                )
            }
			
			
		}
	}
</script>

<style>
</style>
